<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="bx20941">CREATE OPERATOR FAMILY</title><body><p id="sql_command_desc">Defines a new operator family.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">CREATE OPERATOR FAMILY <varname>name</varname>  USING <varname>index_method</varname>  </codeblock></section><section id="section3"><title>Description</title><p><codeph>CREATE OPERATOR FAMILY</codeph> creates a new operator family. An operator family defines
                a collection of related operator classes, and perhaps some additional operators and
                support functions that are compatible with these operator classes but not essential
                for the functioning of any individual index. (Operators and functions that are
                essential to indexes should be grouped within the relevant operator class, rather
                than being "loose" in the operator family. Typically, single-data-type operators are
                bound to operator classes, while cross-data-type operators can be loose in an
                operator family containing operator classes for both data types.)</p><p>The new operator family is initially empty. It should be populated by issuing subsequent
                    <codeph>CREATE OPERATOR CLASS</codeph> commands to add contained operator
                classes, and optionally <codeph>ALTER OPERATOR FAMILY</codeph>commands to add
                "loose" operators and their corresponding support functions.</p>
            <p>If a schema name is given then the operator family is created in the specified
                schema. Otherwise it is created in the current schema. Two operator families in the
                same schema can have the same name only if they are for different index methods.</p><p>The user who defines an operator family becomes its owner. Presently, the creating user must be a
                superuser. (This restriction is made because an erroneous operator family definition
                could confuse or even crash the server.)</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt><varname>name</varname></pt><pd>The (optionally schema-qualified) name of the operator family to be defined. The name can be
                        schema-qualified. </pd></plentry><plentry><pt><varname>index_method</varname></pt><pd>The name of the index method this operator family is for. </pd></plentry></parml></section><section id="section7"><title>Compatibility</title><p><codeph>CREATE OPERATOR FAMILY</codeph> is a Greenplum Database extension. There is no
    <codeph>CREATE OPERATOR FAMILY</codeph> statement in the SQL standard.</p></section><section id="section8"><title>See Also</title><p><codeph><xref href="ALTER_OPERATOR_FAMILY.xml#topic1" type="topic" format="dita"/></codeph>,
                        <codeph><xref href="./DROP_OPERATOR_FAMILY.xml#topic1" type="topic"
                        format="dita"/></codeph>, <codeph><xref href="CREATE_FUNCTION.xml#topic1"
                        type="topic" format="dita"/></codeph>, <codeph><xref
                        href="ALTER_OPERATOR_CLASS.xml#topic1" type="topic" format="dita"
                /></codeph>, <codeph><xref href="CREATE_OPERATOR_CLASS.xml#topic1" type="topic"
                        format="dita"/></codeph>, <codeph><xref
                        href="./DROP_OPERATOR_CLASS.xml#topic1" type="topic" format="dita"
                    /></codeph></p></section></body></topic>
